<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/14
 * Time: 10:29
 */
$key=$_COOKIE['userkey'];
session_start();
if(!isset($_SESSION[$key])){
    echo '<a href="../login/loginUI.php">请重新登陆</a>';
    die;
}
$card_no=$_SESSION[$key]['user_name'];
$money=$_POST['money'];
$sql="UPDATE bankcard SET CardMoney=CardMoney+'$money' WHERE CardNo='$card_no';";
$conn=new  mysqli();
$conn->connect('127.0.0.1','root','root','bank');
$result=$conn->query($sql);
header('location:../loginAction.php');
